using UnityEngine;
using Unity.Entities;
using Unity.Mathematics;

public class RandomWalkingAuthoring : MonoBehaviour
{
    public Vector3 tagertPsotion;
    public Vector3 originPostion;
    public float distanceMin;
    public float distanceMax;
    public uint randomSeed;
    public class Baker : Baker<RandomWalkingAuthoring>
    {
        public override void Bake(RandomWalkingAuthoring authoring)
        {
            Entity entity  = GetEntity(TransformUsageFlags.Dynamic);
            AddComponent(entity, new RandomWalking {
                tagertPsotion =authoring.tagertPsotion,
                originPostion = authoring.originPostion,
                distanceMin = authoring.distanceMin,
                distanceMax = authoring.distanceMax,
                random =new Unity.Mathematics.Random(authoring.randomSeed),
            });
        }
    }
}

public struct RandomWalking : IComponentData
{
    public float3 tagertPsotion;
    public float3 originPostion;
    public float distanceMin;
    public float distanceMax;
    public Unity.Mathematics.Random random;
}